import os
import sys
from typing import Any, Awaitable, Callable, Dict, List, Optional, Set, Tuple, Union

# network
HTTP_TIMEOUT = 2
HTTP_PROXY = None

# log
LOG_LEVEL = "DEBUG"
LOG_ROTATE_FILE_SIZE_IN_GB = 1
LOG_ROTATE_FILE_COUNT = 1

# whether to use cache from offline dir
USE_OFFLINE_CACHE = False
DEFAULT_START_DATE = "2021-01-01"
DEFAULT_END_DATE = "2025-02-01"
DEFAULT_CODE_SET = {512100}
DEFAULT_INDEX_CODE_SET = {"000852"}

try:
    from .local_settings import *
except:
    pass

# validate
assert LOG_LEVEL in ("CRITICAL", "FATAL", "ERROR", "WARNING", "INFO", "DEBUG")
